This page last changed on Oct 20, 2006 by cholmes.

GeoServer makes use of a series of xml files to store configuration informations:

  • services.xml:used to define the common GeoServer configuration options in addition to WFS and WMS services
  • catalog.xml: used to configure the data subsystem
  • info.xml (& associated schema.xml): used to define which FeatureTypes are available through the data subsystem

One of your first challenges will be to decide which xml file you option belongs in. Lets start by considering our example.

Example Configuration issue from Jira:

Jira Task: GEOS-58: Ability to turn off Transactions
Description:
Users have requested the ability to turn 'off' transaction capabilities, so that users of their
WFS's can not modify their databases. I'm not sure if this is in 1.2 yet or not, but we should
get the fix in there, and in a 1.1.1 bug fix release. It should be pretty easy to implement, just
have a configuration setting to turn it off, and transactions check with that global value before
letting a transaction go through. 

This task is to do with the Web Feature Server Functionality of GeoServer. So we will want to work with the services.xml file and add an additional option to the wfs section.

Figure out how to Extend a Configuration File

Extentions should always be additive, and optional. We do not wish to break existing installations of GeoServer.

For our example we will add a "serviceLevel" tag to the wfs section of services.xml. The OGC allows considerable varience in the capabilities of a Web Feature Server while still remaining compliant with their specifications.

OGC Compliant Operations Allowable value
Basic Web Feature Server GetCapabilities DescribeFeatureType GetFeature basic
Transaction Web Feature Server Transaction transactional
Transaction WFS with Optional Locking LockFeature GetFeatureWithLock complete

Extension to services.xml for WFS Level of Service:

<wfs>
 ...
 <serviceLevel>Basic</serviceLevel
 ...
</wfs>

There is almost a conflict here with the FeatureType configuration files, not all FeatureTypes are editable and as such will not allow the Transaction operation. As noted in the GEOS-58 task an acceptable workaround is to restrict write access for the GeoServer at the DataStore level (this can be accomplished by changing file, or database permissions).

Submit Idea to the Email Lists

Next up we can submit our idea to the email list, the following email can serve as an example. Although it includes additional recommendations for the DTO and User Interface.

Sample email:

subject: Configuration proposal for Transactions control
content:
Request for a new configuration information:
1) name: serviceLevel
2) requirement: needed to control level of WFS service (see GEOS-58This
3) configuration file: service.xml
4) sample xml fragments:
<wfs>
 ...
 <serviceLevel>Basic</serviceLevel
 ...
</wfs>

Where serviceLevel can be one of:

Basic
-----
Operations: GetCapabilities
           DescribeFeatureType
           GetFeature
OGC: Basic Web Feature Server

Transactional
-------------
Operations: Transaction
OGC: Transactional Web Feature Server

Complete
--------
Operations: LockFeature

5) DTO modifications: serviceType enum of Basic/Transaction/Complete
6) UI modifications: select drop down on the WFSConfig screen

For additional information See:
http://jira.codehaus.org/secure/ViewIssue.jspa?key=GEOS-93
http://jira.codehaus.org/secure/ViewIssue.jspa?key=GEOS-58 

And then we get to wait for Chris Holmes, or some other friendly GeoServer maintainer for approval. As long as you are simply extending a configuration file with optional content, we may as well go onto the next section while we wait.

We just won't commit quite yet.

Document generated by Confluence on Jan 16, 2008 23:26